package com.yk.points.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yk.common.annotation.Excel;
import com.yk.common.core.domain.BaseEntity;

/**
 * 人员积分使用记录对象 points_user_history
 * 
 * @author xufei
 * @date 2025-04-28
 */
@Data
public class PointsUserHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 用户id */
    private Long userId;
    @Excel(name = "用户名称")
    private String userName;

    /** 积分 */
    @Excel(name = "积分")
    private Integer usePoints;

    /** 使用日期 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "使用日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date userTime;

    @Excel(name = "积分余额")
    private Integer points;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("points", getPoints())
            .append("userTime", getUserTime())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
